Strings are pretty simple to create — you just assign a sequence of
text characters to a variable.
> str = "Sample String"
Sample String
The show
command reveals the attributes associated with each
string. The information can also be obtained using the normal
shorthand method.
> show ( str )
name: str
class: string
type:
nr: 1
nc: 1
> str.class
string
> str.l
13
You can also put escape characters in strings. The following escape
codes are supported:
\n
which produces a newline
\t
which produces a horizontal tab
\f
which produces a form feed
\b
which produces a backspace
\r
which produces a carriage return
\a
which produces an alert (bell)
\v
which produces a vertical tab
\\
which produces a backslash
\'
which produces a single quote
\"
which produces a double quote